﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
    <xsl:output method="html" indent="yes"/>
    <xsl:template match="/">
      <table border="0" cellpadding="1" cellspacing="2">
        <tr>
          <th>Title</th>
          <th>Due Date</th>
          <th>Status</th>
        </tr>
        <xsl:for-each select="/ArrayOfTask/Task">
          <tr>
            <td>
              <a>
                <xsl:attribute name ="href">
                  <xsl:value-of select ="'http://tk3-seutil11/Tasks/ViewTask.aspx?TaskID='"/>
                  <xsl:value-of select ="ID"/>
                </xsl:attribute>
                <xsl:value-of select ="Name"/>
              </a>
            </td>
            <td>
              <xsl:variable name ="dueDate" select="DueDate" />
              <xsl:value-of select ="substring($dueDate,6,2)"/>/<xsl:value-of select ="substring($dueDate,9,2)"/>/<xsl:value-of select ="substring($dueDate,1,4)"/>
            </td>
            <td>
              <xsl:value-of select ="Status/Name"/>
            </td>
          </tr>
          
        </xsl:for-each>
      </table>
    </xsl:template>
</xsl:stylesheet>
